/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       dialog_options_base.h


	$Header: /game/dialog_options_base.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef DIALOG_OPTIONS_BASE_H_INCLUDED
#define DIALOG_OPTIONS_BASE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include "button_group.h"
#include "dialog_box.h"

class t_scrollbar;
class t_help_block;
// ---------------------------------------------------------------------
// options dialog.  Currently only show screen mode / resolution.
// ---------------------------------------------------------------------
class t_dialog_options_base : public t_window
{
public:
	t_dialog_options_base( t_window* parent, t_bitmap_group_ptr bitmaps );

protected:
	t_toggle_button* add_checkbox( std::string const&	name,	 t_button_handler   handler,
								   bool					pressed, std::string const& text,
								   t_help_block const * help = NULL );
	virtual void cancel( t_button* );
	void		 combat_speed_change( t_scrollbar*, int value );
	int			 convert_speed_from_linear( int value );
	int			 convert_speed_to_linear( int value );
	void		 create_scrollbars();
	void		 create_text( char const* label, std::string text );
    t_text_window* create_text_with_value( char const* label, std::string text, int value );
	void		 music_change( t_scrollbar*, int value );
	virtual void ok_clicked( t_button* );
    void         set_text_value( t_text_window* text_window, int value );
	void		 sound_change( t_scrollbar*, int value );

	t_window*			m_background;
	t_bitmap_group_ptr	m_bitmaps;
	int					m_combat_speed;
	t_text_window*		m_combat_speed_text_window;
	t_text_window*		m_music_text_window;
	t_text_window*		m_sound_text_window;
	int					m_old_music_volume;
	int					m_old_sound_volume;
};

#endif // DIALOG_OPTIONS_BASE_H_INCLUDED
